/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlEditPo.java
 *
 * Created on 20 ม.ค. 2553, 2:57:23
 */

package warehouse;

/**
 *
 * @author Administrator
 */
public class PnlCreatePo extends javax.swing.JPanel {

    /** Creates new form PnlEditPo */
    public PnlCreatePo() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlHeadEditPo = new javax.swing.JPanel();
        lblHeadEditPo = new javax.swing.JLabel();
        btnPoEditSave = new javax.swing.JButton();
        btnPoEditCancel = new javax.swing.JButton();
        btnPoEditDel = new javax.swing.JButton();
        btnPoPrint = new javax.swing.JButton();
        pnlEditPo = new javax.swing.JPanel();
        lblPoDateRe = new javax.swing.JLabel();
        txtDePrCode = new javax.swing.JTextField();
        txtPoCode = new javax.swing.JTextField();
        txtSuCode = new javax.swing.JTextField();
        txtPoDateRe = new javax.swing.JTextField();
        lblSuCode = new javax.swing.JLabel();
        lblDePrCode = new javax.swing.JLabel();
        lblPoCode = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblEditPo = new javax.swing.JTable();
        cmbDTCode = new javax.swing.JComboBox();
        lblDTCode = new javax.swing.JLabel();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        pnlHeadEditPo.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadEditPo.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlHeadEditPo.setMinimumSize(new java.awt.Dimension(700, 80));
        pnlHeadEditPo.setPreferredSize(new java.awt.Dimension(700, 80));

        lblHeadEditPo.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadEditPo.setText("การสั่งซื้อ");

        btnPoEditSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/save_30x30.gif"))); // NOI18N

        btnPoEditCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancel_30x30.gif"))); // NOI18N

        btnPoEditDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/del_30x30.gif"))); // NOI18N

        btnPoPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnPoPrint.setMaximumSize(new java.awt.Dimension(40, 40));
        btnPoPrint.setMinimumSize(new java.awt.Dimension(40, 40));
        btnPoPrint.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout pnlHeadEditPoLayout = new javax.swing.GroupLayout(pnlHeadEditPo);
        pnlHeadEditPo.setLayout(pnlHeadEditPoLayout);
        pnlHeadEditPoLayout.setHorizontalGroup(
            pnlHeadEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadEditPoLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblHeadEditPo)
                    .addGroup(pnlHeadEditPoLayout.createSequentialGroup()
                        .addGap(0, 0, 0)
                        .addComponent(btnPoEditSave, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPoEditCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPoEditDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnPoPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(490, Short.MAX_VALUE))
        );
        pnlHeadEditPoLayout.setVerticalGroup(
            pnlHeadEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadEditPoLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(lblHeadEditPo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlHeadEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btnPoPrint, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnPoEditSave, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addComponent(btnPoEditCancel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                    .addComponent(btnPoEditDel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(pnlHeadEditPo, java.awt.BorderLayout.PAGE_START);

        lblPoDateRe.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPoDateRe.setText("วันที่กำหนดส่ง :");

        txtDePrCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtPoCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtSuCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtPoDateRe.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblSuCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSuCode.setText("รหัสผู้จำหน่าย :");

        lblDePrCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblDePrCode.setText("รหัสใบขอซื้อ :");

        lblPoCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPoCode.setText("รหัสใบสั่งซื้อ :");

        tblEditPo.setFont(new java.awt.Font("Tahoma", 0, 12));
        tblEditPo.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "รหัสสินค้า", "รายการสินค้า", "จำนวนสินค้า", "ราคา/หน่วย", "หน่วย"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, true, true, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblEditPo);

        cmbDTCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        lblDTCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblDTCode.setText("ประเภทสินค้า :");

        javax.swing.GroupLayout pnlEditPoLayout = new javax.swing.GroupLayout(pnlEditPo);
        pnlEditPo.setLayout(pnlEditPoLayout);
        pnlEditPoLayout.setHorizontalGroup(
            pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditPoLayout.createSequentialGroup()
                .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEditPoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 681, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlEditPoLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblDePrCode, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblDTCode, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblPoDateRe, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtPoDateRe, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(pnlEditPoLayout.createSequentialGroup()
                                .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(cmbDTCode, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(txtDePrCode, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(lblPoCode)
                                    .addComponent(lblSuCode))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txtSuCode)
                                    .addComponent(txtPoCode, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap())
        );
        pnlEditPoLayout.setVerticalGroup(
            pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditPoLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlEditPoLayout.createSequentialGroup()
                        .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtDePrCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblDePrCode))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblDTCode)
                            .addComponent(cmbDTCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlEditPoLayout.createSequentialGroup()
                        .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtPoCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblPoCode))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblSuCode)
                            .addComponent(txtSuCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEditPoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtPoDateRe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblPoDateRe))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(107, Short.MAX_VALUE))
        );

        add(pnlEditPo, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnPoEditCancel;
    private javax.swing.JButton btnPoEditDel;
    private javax.swing.JButton btnPoEditSave;
    private javax.swing.JButton btnPoPrint;
    private javax.swing.JComboBox cmbDTCode;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblDTCode;
    private javax.swing.JLabel lblDePrCode;
    private javax.swing.JLabel lblHeadEditPo;
    private javax.swing.JLabel lblPoCode;
    private javax.swing.JLabel lblPoDateRe;
    private javax.swing.JLabel lblSuCode;
    private javax.swing.JPanel pnlEditPo;
    private javax.swing.JPanel pnlHeadEditPo;
    private javax.swing.JTable tblEditPo;
    private javax.swing.JTextField txtDePrCode;
    private javax.swing.JTextField txtPoCode;
    private javax.swing.JTextField txtPoDateRe;
    private javax.swing.JTextField txtSuCode;
    // End of variables declaration//GEN-END:variables

}
